
package jogoprojetopi;

import s3t.gameControl.events.*;
import s3t.gameElements.Element;

public class ListenerDeAnimacaoDoPersonagem implements AnimationListener
{

    public void AnimationPerformed(AnimationEvent animation)
    {
        Element vitima = animation.getElement();

        String lastKey = animation.getiCollection().getLastKey();

        if (lastKey.equals("morraPersonagem") && animation.getiCollection().getCurrentFrame() == 0)
        {
            vitima.delete();
        }

    }

}
